unit uFormMain;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    ListBox1: TListBox;
    procedure Edit1Change(Sender: TObject);
  private
    function IsConsistsInList(aText: string): boolean;
  public
  end;

var
  Form1: TForm1;

implementation   
{$R *.dfm}

procedure TForm1.Edit1Change(Sender: TObject);
begin
  if IsConsistsInList(Edit1.Text) then
    ListBox1.Visible := True
  else
    ListBox1.Visible := False;
end;

function TForm1.IsConsistsInList(aText: string): boolean;
var
  i : integer;
begin
  Result := False;
  for i := 0 to ListBox1.Items.Count - 1 do
    if aText = copy(ListBox1.Items[i], 1, length(atext)) then
  begin
    Result := True;
    Break;
  end;
end;

end.
